package community.hospital.service.domain;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import community.hospital.convert.PageConvert;
import community.hospital.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import community.hospital.entity.request.ListUserRequest;
import community.hospital.entity.response.UserResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ydj
 * @description 针对表【user】的数据库操作Service
 * @createDate 2023-01-16 16:35:35
 */
public interface UserService extends IService<User> {
    /**
     * 分页待条件查询
     * @param request
     * @return
     */
    Page<UserResponse> listUser(ListUserRequest request);

    /**
     * 根据idCard统计用户数量
     *
     * @param idCard
     * @return
     */
    int countByIdCard(String idCard);

    /**
     * 根据phone统计用户数量
     *
     * @param phone
     * @return
     */
    int countByPhone(String phone);

    /**
     * 通过用户账户查询用户信息
     *
     * @param account
     * @return
     */
    int countByAccount(String account);

    /**
     * 通过账户查询用户
     * @param account
     * @return
     */

    User findUserByAccount(String account);


}
